package mx.com.sinformex.simbel.db.dao;

import java.util.List;

import org.springframework.transaction.TransactionException;

import mx.com.sinformex.simbel.db.eos.DataSource;
import mx.com.sinformex.simbel.db.eos.Group;
import mx.com.sinformex.simbel.db.eos.Report;
import mx.com.sinformex.simbel.db.eos.ReportGroupJoin;
import mx.com.sinformex.simbel.db.eos.ReportParam;
import mx.com.sinformex.simbel.db.eos.User;

/**
 * @author Oscar Ivan Hernandez Ventura [ oscar at sinformex dot com dot mx]
 *
 * @version $ Id : IAdminDataAccess.java , v 1.0 08/05/2009 angellore $
 */
public interface IAdminDataAccess {

	public User getUser(String username, String password);
	public void saveUser(User user) throws TransactionException;
	public void updateUser(User user) throws TransactionException;
	public void deleteUser(User user) throws TransactionException;
	public List<User> fetchUsers();
	
	public DataSource getDatasource(String name);
	public void saveDatasource(DataSource ds) throws TransactionException;
	public void updateDatasource(DataSource ds) throws TransactionException;
	public void deleteDatasource(DataSource ds) throws TransactionException;
	public List<DataSource> fetchDatasources();
	
	public Group getGroup(Integer id);
	public void saveGroup(Group group) throws TransactionException;
	public void updateGroup(Group group) throws TransactionException;
	public void deleteGroup(Group group) throws TransactionException;
	public List<Group> fetchGroups();	
	
	public Report getReport(Integer id);
	public void saveReport(Report group) throws TransactionException;
	public void updateReport(Report group) throws TransactionException;
	public void deleteReport(Report group) throws TransactionException;
	public List<Report> fetchReports();
	public void addParamToReport(Report report, ReportParam param);
	public ReportParam getReportParam(Integer id);
	public void deleteParamFromReport(Report report, ReportParam param);
	
	public List<ReportGroupJoin> fetchGroupReportJoin();
	public void addReportGroupJoin(ReportGroupJoin join);
	public void deleteReportGroupJoin(ReportGroupJoin join);
	public ReportGroupJoin getReportGroupJoin(Integer group, Integer report);
	
}
